Skip to content

perf: optimize RemoveDuplicateElement for small slices#1701

Open
AKonnyaku wants to merge 1 commit intoapache:masterfrom
AKonnyaku:util-test
Open

perf: optimize RemoveDuplicateElement for small slices#1701
AKonnyaku wants to merge 1 commit intoapache:masterfrom
AKonnyaku:util-test

Conversation

@AKonnyaku
Copy link
Contributor

This PR optimizes the RemoveDuplicateElement function in util/util.go to improve performance for small slices.

  • Introduces a hybrid approach using linear scan for small slices (<= 10 elements) and map-based deduplication for larger ones.
  • Avoids map allocation overhead for small inputs, significantly reducing operation time and memory usage.
  • Benchmarks demonstrate a 44.2% performance improvement for small slice operations: "BenchmarkProfile_Old-20 85.29 ns/op" vs "BenchmarkProfile_New-20 47.57 ns/op".
  • Maintains original logic for larger datasets to ensure scalability without regression.
  • Fixes linter warnings in util/util.go by adding missing periods to function comments.
  • Keeps util/util_test.go unchanged as no new tests were required to maintain existing coverage.

@github-actions
Copy link

Benchmark Comparison

Comparing base branch (0fe9505)
vs PR branch (e8e54bf)

goos: linux
goarch: amd64
pkg: github.com/casbin/casbin/v3
cpu: AMD EPYC 7763 64-Core Processor                
                                                 │ base-bench.txt │             pr-bench.txt             │
                                                 │     sec/op     │    sec/op     vs base                      Diff          │
CachedRaw                                          15.41n ± ∞ ¹   15.09n ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.08% ➡️
CachedBasicModel                                   175.5n ± ∞ ¹   166.7n ± ∞ ¹       ~ (p=1.000 n=1) ²         -5.01% ➡️
CachedRBACModel                                    179.1n ± ∞ ¹   170.9n ± ∞ ¹       ~ (p=1.000 n=1) ²         -4.58% ➡️
CachedRBACModelSmall                               183.0n ± ∞ ¹   170.3n ± ∞ ¹       ~ (p=1.000 n=1) ²         -6.94% ➡️
CachedRBACModelMedium                              195.5n ± ∞ ¹   182.1n ± ∞ ¹       ~ (p=1.000 n=1) ²         -6.85% ➡️
CachedRBACModelLarge                               162.2n ± ∞ ¹   156.0n ± ∞ ¹       ~ (p=1.000 n=1) ²         -3.82% ➡️
CachedRBACModelWithResourceRoles                   175.8n ± ∞ ¹   165.7n ± ∞ ¹       ~ (p=1.000 n=1) ²         -5.75% ➡️
CachedRBACModelWithDomains                         181.0n ± ∞ ¹   176.9n ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.27% ➡️
CachedABACModel                                    2.766µ ± ∞ ¹   2.668µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -3.54% ➡️
CachedKeyMatchModel                                192.9n ± ∞ ¹   183.2n ± ∞ ¹       ~ (p=1.000 n=1) ²         -5.03% ➡️
CachedRBACModelWithDeny                            176.2n ± ∞ ¹   166.1n ± ∞ ¹       ~ (p=1.000 n=1) ²         -5.73% ➡️
CachedPriorityModel                                177.6n ± ∞ ¹   166.9n ± ∞ ¹       ~ (p=1.000 n=1) ²         -6.02% ➡️
CachedWithEnforceContext                           251.2n ± ∞ ¹   244.5n ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.67% ➡️
CachedRBACModelMediumParallel                      172.8n ± ∞ ¹   163.1n ± ∞ ¹       ~ (p=1.000 n=1) ²         -5.61% ➡️
HasPolicySmall                                     434.5n ± ∞ ¹   425.1n ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.16% ➡️
HasPolicyMedium                                    441.7n ± ∞ ¹   435.0n ± ∞ ¹       ~ (p=1.000 n=1) ²         -1.52% ➡️
HasPolicyLarge                                     477.2n ± ∞ ¹   463.3n ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.91% ➡️
AddPolicySmall                                     527.0n ± ∞ ¹   524.6n ± ∞ ¹       ~ (p=1.000 n=1) ²         -0.46% ➡️
AddPolicyMedium                                    667.9n ± ∞ ¹   660.7n ± ∞ ¹       ~ (p=1.000 n=1) ²         -1.08% ➡️
AddPolicyLarge                                     1.167µ ± ∞ ¹   1.164µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -0.26% ➡️
RemovePolicySmall                                  528.1n ± ∞ ¹   502.0n ± ∞ ¹       ~ (p=1.000 n=1) ²         -4.94% ➡️
RemovePolicyMedium                                 550.2n ± ∞ ¹   543.5n ± ∞ ¹       ~ (p=1.000 n=1) ²         -1.22% ➡️
RemovePolicyLarge                                  595.9n ± ∞ ¹   574.6n ± ∞ ¹       ~ (p=1.000 n=1) ²         -3.57% ➡️
Raw                                                15.06n ± ∞ ¹   15.38n ± ∞ ¹       ~ (p=1.000 n=1) ²         +2.12% ➡️
BasicModel                                         3.683µ ± ∞ ¹   3.616µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -1.82% ➡️
RBACModel                                          5.427µ ± ∞ ¹   5.339µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -1.62% ➡️
RBACModelSizes/small                               48.26µ ± ∞ ¹   46.74µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -3.15% ➡️
RBACModelSizes/medium                              493.0µ ± ∞ ¹   482.7µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.09% ➡️
RBACModelSizes/large                               5.384m ± ∞ ¹   5.527m ± ∞ ¹       ~ (p=1.000 n=1) ²         +2.66% ➡️
RBACModelSmall                                     57.13µ ± ∞ ¹   55.47µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.91% ➡️
RBACModelMedium                                    561.8µ ± ∞ ¹   552.5µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -1.66% ➡️
RBACModelLarge                                     5.849m ± ∞ ¹   5.811m ± ∞ ¹       ~ (p=1.000 n=1) ²         -0.65% ➡️
RBACModelWithResourceRoles                         4.440µ ± ∞ ¹   4.313µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.86% ➡️
RBACModelWithDomains                               4.980µ ± ∞ ¹   4.885µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -1.91% ➡️
ABACModel                                          2.696µ ± ∞ ¹   2.652µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -1.63% ➡️
ABACRuleModel                                      3.992m ± ∞ ¹   3.906m ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.15% ➡️
KeyMatchModel                                      6.014µ ± ∞ ¹   5.816µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -3.29% ➡️
RBACModelWithDeny                                  6.840µ ± ∞ ¹   6.698µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.08% ➡️
PriorityModel                                      4.137µ ± ∞ ¹   4.036µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.44% ➡️
RBACModelWithDomainPatternLarge                    12.98µ ± ∞ ¹   12.72µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.00% ➡️
RoleManagerSmall                                   48.93µ ± ∞ ¹   46.67µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -4.62% ➡️
RoleManagerMedium                                  538.2µ ± ∞ ¹   536.8µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -0.26% ➡️
RoleManagerLarge                                   6.557m ± ∞ ¹   6.018m ± ∞ ¹       ~ (p=1.000 n=1) ²         -8.22% ➡️
BuildRoleLinksWithPatternLarge                     289.2m ± ∞ ¹   283.0m ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.14% ➡️
BuildRoleLinksWithDomainPatternLarge               9.357m ± ∞ ¹   9.116m ± ∞ ¹       ~ (p=1.000 n=1) ²         -2.58% ➡️
BuildRoleLinksWithPatternAndDomainPatternLarge     296.5m ± ∞ ¹   292.5m ± ∞ ¹       ~ (p=1.000 n=1) ²         -1.35% ➡️
HasLinkWithPatternLarge                            1.006µ ± ∞ ¹   1.000µ ± ∞ ¹       ~ (p=1.000 n=1) ²         -0.60% ➡️
HasLinkWithDomainPatternLarge                      345.6n ± ∞ ¹   349.6n ± ∞ ¹       ~ (p=1.000 n=1) ²         +1.16% ➡️
HasLinkWithPatternAndDomainPatternLarge            996.2n ± ∞ ¹   997.5n ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.13% ➡️
ConcurrentHasLinkWithMatching                      1.152µ ± ∞ ¹   1.175µ ± ∞ ¹       ~ (p=1.000 n=1) ²         +2.00% ➡️
geomean                                              5.000µ         4.871µ                                     -2.58% ➡️
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05

                                                 │ base-bench.txt │             pr-bench.txt              │
                                                 │      B/op      │     B/op       vs base                     Diff          │
CachedRaw                                           0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedBasicModel                                    104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModel                                     104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModelSmall                                104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModelMedium                               104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModelLarge                                96.00 ± ∞ ¹     96.00 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModelWithResourceRoles                    104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModelWithDomains                          120.0 ± ∞ ¹     120.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedABACModel                                   1.514Ki ± ∞ ¹   1.504Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.66% ➡️
CachedKeyMatchModel                                 152.0 ± ∞ ¹     152.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModelWithDeny                             104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedPriorityModel                                 104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedWithEnforceContext                            176.0 ± ∞ ¹     176.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
CachedRBACModelMediumParallel                       104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
HasPolicySmall                                      102.0 ± ∞ ¹     102.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
HasPolicyMedium                                     109.0 ± ∞ ¹     109.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
HasPolicyLarge                                      117.0 ± ∞ ¹     117.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
AddPolicySmall                                      152.0 ± ∞ ¹     152.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
AddPolicyMedium                                     166.0 ± ∞ ¹     166.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
AddPolicyLarge                                      408.0 ± ∞ ¹     409.0 ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.25% ➡️
RemovePolicySmall                                   166.0 ± ∞ ¹     166.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
RemovePolicyMedium                                  174.0 ± ∞ ¹     173.0 ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.57% ➡️
RemovePolicyLarge                                   181.0 ± ∞ ¹     181.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
Raw                                                 0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
BasicModel                                        1.487Ki ± ∞ ¹   1.480Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.47% ➡️
RBACModel                                         2.033Ki ± ∞ ¹   2.020Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.64% ➡️
RBACModelSizes/small                              19.80Ki ± ∞ ¹   19.67Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.66% ➡️
RBACModelSizes/medium                             187.2Ki ± ∞ ¹   186.9Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.16% ➡️
RBACModelSizes/large                              1.812Mi ± ∞ ¹   1.812Mi ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.00% ➡️
RBACModelSmall                                    19.90Ki ± ∞ ¹   19.74Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.80% ➡️
RBACModelMedium                                   190.1Ki ± ∞ ¹   189.6Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.26% ➡️
RBACModelLarge                                    1.841Mi ± ∞ ¹   1.840Mi ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.05% ➡️
RBACModelWithResourceRoles                        1.809Ki ± ∞ ¹   1.799Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.55% ➡️
RBACModelWithDomains                              1.797Ki ± ∞ ¹   1.790Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.39% ➡️
ABACModel                                         1.506Ki ± ∞ ¹   1.498Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.53% ➡️
ABACRuleModel                                     1.248Mi ± ∞ ¹   1.243Mi ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.40% ➡️
KeyMatchModel                                     3.017Ki ± ∞ ¹   2.996Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.70% ➡️
RBACModelWithDeny                                 2.439Ki ± ∞ ¹   2.425Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.57% ➡️
PriorityModel                                     1.736Ki ± ∞ ¹   1.729Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.40% ➡️
RBACModelWithDomainPatternLarge                   8.689Ki ± ∞ ¹   8.675Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.16% ➡️
RoleManagerSmall                                    800.0 ± ∞ ¹     800.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
RoleManagerMedium                                 13.63Ki ± ∞ ¹   13.63Ki ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
RoleManagerLarge                                  224.6Ki ± ∞ ¹   224.6Ki ± ∞ ¹       ~ (p=1.000 n=1) ³        +0.00% ➡️
BuildRoleLinksWithPatternLarge                    60.79Mi ± ∞ ¹   60.70Mi ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.15% ➡️
BuildRoleLinksWithDomainPatternLarge              3.950Mi ± ∞ ¹   3.941Mi ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.23% ➡️
BuildRoleLinksWithPatternAndDomainPatternLarge    62.41Mi ± ∞ ¹   62.37Mi ± ∞ ¹       ~ (p=1.000 n=1) ³        -0.06% ➡️
HasLinkWithPatternLarge                             112.0 ± ∞ ¹     112.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
HasLinkWithDomainPatternLarge                       16.00 ± ∞ ¹     16.00 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
HasLinkWithPatternAndDomainPatternLarge             112.0 ± ∞ ¹     112.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
ConcurrentHasLinkWithMatching                       736.0 ± ∞ ¹     736.0 ± ∞ ¹       ~ (p=1.000 n=1) ²        +0.00% ➡️
geomean                                                         ⁴                                              -0.16% ➡️               ⁴
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ need >= 4 samples to detect a difference at alpha level 0.05
⁴ summaries must be >0 to compute geomean

                                                 │ base-bench.txt │             pr-bench.txt             │
                                                 │   allocs/op    │  allocs/op    vs base                      Diff          │
CachedRaw                                           0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedBasicModel                                    4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModel                                     4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModelSmall                                4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModelMedium                               4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModelLarge                                3.000 ± ∞ ¹    3.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModelWithResourceRoles                    4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModelWithDomains                          4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedABACModel                                     18.00 ± ∞ ¹    18.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedKeyMatchModel                                 4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModelWithDeny                             4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedPriorityModel                                 4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedWithEnforceContext                            4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
CachedRBACModelMediumParallel                       4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
HasPolicySmall                                      4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
HasPolicyMedium                                     4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
HasPolicyLarge                                      5.000 ± ∞ ¹    5.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
AddPolicySmall                                      6.000 ± ∞ ¹    6.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
AddPolicyMedium                                     7.000 ± ∞ ¹    7.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
AddPolicyLarge                                      9.000 ± ∞ ¹    9.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RemovePolicySmall                                   7.000 ± ∞ ¹    7.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RemovePolicyMedium                                  7.000 ± ∞ ¹    7.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RemovePolicyLarge                                   8.000 ± ∞ ¹    8.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
Raw                                                 0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
BasicModel                                          18.00 ± ∞ ¹    18.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModel                                           36.00 ± ∞ ¹    36.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelSizes/small                                481.0 ± ∞ ¹    481.0 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelSizes/medium                              4.829k ± ∞ ¹   4.829k ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelSizes/large                               48.18k ± ∞ ¹   48.17k ± ∞ ¹       ~ (p=1.000 n=1) ³         -0.02% ➡️
RBACModelSmall                                      616.0 ± ∞ ¹    616.0 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelMedium                                    6.016k ± ∞ ¹   6.016k ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelLarge                                     60.08k ± ∞ ¹   60.08k ± ∞ ¹       ~ (p=1.000 n=1) ³         +0.00% ➡️
RBACModelWithResourceRoles                          28.00 ± ∞ ¹    28.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelWithDomains                                26.00 ± ∞ ¹    26.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
ABACModel                                           17.00 ± ∞ ¹    17.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
ABACRuleModel                                      37.09k ± ∞ ¹   37.09k ± ∞ ¹       ~ (p=1.000 n=1) ³         +0.00% ➡️
KeyMatchModel                                       38.00 ± ∞ ¹    38.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelWithDeny                                   50.00 ± ∞ ¹    50.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
PriorityModel                                       23.00 ± ∞ ¹    23.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RBACModelWithDomainPatternLarge                     73.00 ± ∞ ¹    73.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RoleManagerSmall                                    100.0 ± ∞ ¹    100.0 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RoleManagerMedium                                  1.744k ± ∞ ¹   1.744k ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
RoleManagerLarge                                   19.74k ± ∞ ¹   19.74k ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
BuildRoleLinksWithPatternLarge                     3.560M ± ∞ ¹   3.560M ± ∞ ¹       ~ (p=1.000 n=1) ³         +0.00% ➡️
BuildRoleLinksWithDomainPatternLarge               120.2k ± ∞ ¹   120.2k ± ∞ ¹       ~ (p=1.000 n=1) ³         +0.00% ➡️
BuildRoleLinksWithPatternAndDomainPatternLarge     3.637M ± ∞ ¹   3.637M ± ∞ ¹       ~ (p=1.000 n=1) ³         +0.00% ➡️
HasLinkWithPatternLarge                             9.000 ± ∞ ¹    9.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
HasLinkWithDomainPatternLarge                       1.000 ± ∞ ¹    1.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
HasLinkWithPatternAndDomainPatternLarge             9.000 ± ∞ ¹    9.000 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
ConcurrentHasLinkWithMatching                       11.00 ± ∞ ¹    11.00 ± ∞ ¹       ~ (p=1.000 n=1) ²         +0.00% ➡️
geomean                                                         ⁴                                              -0.00% ➡️               ⁴
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ need >= 4 samples to detect a difference at alpha level 0.05
⁴ summaries must be >0 to compute geomean

🤖 This comment will be automatically updated with the latest benchmark results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant